package com.whately.core.base.verifycode;

import com.whately.core.base.constant.VerifyCodeTypeEnum;
import com.whately.core.base.verifycode.util.SmsGenerateResult;
import com.whately.core.base.vo.req.CheckSmsCodeCorrectReqVo;

public interface WhatelyVerifyCodeFacade {
    //手机验证码校验
    void checkSmsCodeWhenThroughMobile(CheckSmsCodeCorrectReqVo checkSmsCodeCorrectReqVo, VerifyCodeTypeEnum verifyCodeTypeEnum);

    SmsGenerateResult sendSmsVerifyCode(VerifyCodeTypeEnum verifyCodeType,
                                        String mobile, int expireMinutes);



    //校验验证码，通过解密token方式
    void checkImgVerifyCodeFromAesToken(VerifyCodeTypeEnum verifyCodeType,String token,String riskUniqueId,String imgVerifyCode);


    void checkSmsSendRule(String mobile);


    boolean riskCheckPass(String riskUniqueId);

    /**
     * 最近1分钟内，cacheKey尝试的次数
     */
    int retryTimeInLatestOneMinutes(String riskUniqueId,int maxTryCount);
    void retryTimeClean(String riskUniqueId);
}
